#!/usr/bin/env python3.8
# -*- encoding: utf-8 -*-
'''
@File    :   ext.py
@Time    :   2021/10/09 09:13:40
@Author  :   windstarry 
@Version :   1.0
'''
# here put the import lib

from flask_bootstrap import Bootstrap
from flask_login import LoginManager
from flask_mail import Mail
from flask_moment import Moment
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_avatars import Avatars

bootstrap = Bootstrap()
db = SQLAlchemy()
login_manager = LoginManager()
mail = Mail()
moment = Moment()
migrate = Migrate()
avatars = Avatars()

#定义flask-login的登录视图
login_manager.login_view = 'auth.login'
#义flask-login的登录消息，默认为'Please log in to access this page.'
login_manager.login_message = '请先登录'
